﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ERPStudio;
using System.Data.SqlClient;

namespace Fares
{
    public partial class ListafacturiFrm : FrmRezumat
    {
        DataSets.ESRPDataSetPlati.fares_GenereazaDocumentePentruPlataDataTable facturi = null;
        public ListafacturiFrm(ModuleClass mc, DataSets.ESRPDataSetPlati.fares_GenereazaDocumentePentruPlataDataTable gdpp)
            : base(mc)
        {
            facturi = gdpp;
            InitializeComponent();
            this.SelectionAddOn = true;
            this.ReadOnly = true;
            ListaFacturiDGV.ReadOnly = true;
        }

        private void ListafacturiFrm_Load(object sender, EventArgs e)
        {
            SqlConnection con = DeschideConexiune(workConnString);
            //this.p/arteneriTableAdapter.Connection = con;
            //this.parteneriTableAdapter.Fill(this.eSRPDataSet.Parteneri);
            InchideConexiune(con);
            facturiBS.DataSource = facturi.DataSet;
            facturiBS.DataMember = facturi.TableName;
            facturiBS.Filter = "NrDoc<>''";
            facturiBS.Sort = "RestPlata desc";
        }
    }
}
